package com.zzyy.dtx.msg.api;


import com.zzyy.dtx.msg.dto.MsgDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;


@FeignClient("DTX-MSG5001")
public interface MsgApi {

    //设计图第2步，接收"待发送"消息，把消息保持为“待发送”状态
    @PostMapping(value = "/msg/prepareMsg")
    public  void prepareMsg(@RequestBody MsgDTO msgDTO);

    //设计图第5步，确认消息可以发送了，把消息状态改为“已发送”
    @PostMapping(value = "/msg/confirmMsg")
    public  void confirmMsg(@RequestBody  MsgDTO msgDTO);

    //设计图第9步，把消息直接删除，当然，也可以不删除
    @PostMapping(value = "/msg/deleteMsg")
    public  void deleteMsg(@RequestBody  MsgDTO msgDTO);

    //@PostMapping(value = "/msg/deleteByMsgId")
    //public  void deleteByMsgId(String deleteByMsgId);

}
